package ru.study.thinkin.chapter10.fabricSquadron;

abstract class Character {
	public abstract void attack(); 
}

abstract class Mage extends  Character {
	public void attack() {
	     cast();
	}  
	protected abstract void cast();
}

abstract class Archer extends  Character  {
	@Override
	public void attack() {
		shoot();
	}
	protected abstract void shoot();
}

abstract class Warrior extends  Character  {
	@Override
	public void attack() {
		punch();		
	}
	protected abstract void punch();
}

 
 class ElfMage extends Mage {

	 public void cast() {
		  System.out.println("use elf's magic ");
	  }
}

 class ElfArcher extends Archer {
	 	  
	 public void shoot() {
		 System.out.println("use elf's bowl ");
	  }	  
}

 class ElfWarrior extends Warrior {
	  public void punch() {
		  System.out.println("use elf's might ");
	  }	  
}
 
 class OrcWarrior extends Warrior {
	  public void punch() {
		  System.out.println("use orc's might ");
	  }	  
}
 